package cn.com.yuuuu.domain.model;

import cn.com.yuuuu.config.MyMessageSource;
import lombok.Data;

/**
 * 通用返回对象
 *
 * @author wangtx
 * @date 2019/4/19
 */
@Data
public class CommonResult<T> {
    private long code;
    private String message;
    private T data;
    private long dataCount;

    public CommonResult() {
    }

    public CommonResult(String message, MyMessageSource myMessageSource) {
        this.message = myMessageSource.getSourceFromCache(message, null);
    }


}
